﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using static DXApplicationTangche.原型.TaskDTOS;

namespace DXApplicationTangche.UC.任务.BaseForm
{
    public partial class 任务Form : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        /// <summary>
        /// 从父任务预览进入
        /// </summary>
        /// <param name="taskId"></param>
        public 任务Form(String taskId)
        {
            InitializeComponent();
            this.barEditItem扫码.Enabled = false;
        }

        /// <summary>
        /// 从大菜单进入，扫码进入任务
        /// </summary>
        /// <param name="enum"></param>
        public 任务Form(Enum样衣子任务 @enum)
        {
            InitializeComponent();
            this.barEditItem扫码.Enabled = true;  //  传父任务ID
        }

        /// <summary>
        /// 初始化panel
        /// </summary>
        /// <param name="frm"></param>
        private void initPanel(Form frm)
        {
            this.panelControl任务.Controls.Clear();
            //指示窗体显示是否为顶级窗口
            frm.TopLevel = false;
            this.panelControl任务.Controls.Add(frm);
            frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            frm.Dock = System.Windows.Forms.DockStyle.Fill;
            frm.Show();
        }
    }
}